﻿<html>
<head>
  <meta content="text/html; charset=Cp1252" http-equiv="Content-Type">
  <title>Main Window</title>
</head>

<body>
<p><font size="5">Main Window</font> </p>
<hr>

<p><img src="../images/MainView.PNG" alt="Main JSimpleSim Window"></p>
<hr>

<p><b>Main Memory</b> </p>

<p>The 256 bytes of memory that our simple computer uses are represented in
this table. Each cell represents an address, or memory location, which is
identified by the hex number assigned to it. This hex number can range anywhere
between <code>00</code> and <code>FF</code> (0 to 255, for a total of 256
bytes). When a program is assembled and executed, the values in the addresses
will update accordingly. To edit a cell, double click inside of the cell.</p>

<p><b>Registers</b> </p>

<p>Our computer uses 16 registers, and they are all represented in this
one-column table. Like the Main Memory, the values in the registers will update
accordingly when a program is assembled and executed. To edit a cell, double click inside of the cell.</p>

<p><b>Program Counter (PC)</b></p>

<p>The program counter indicates which memory location the simulator is
currently looking at during program execution. All of the computer's
instructions require two bytes, so the value in the program counter will
increment by two after each instruction is read. You can reset the program
counter to <code>00</code> at any time by clicking the =0 button.</p>

<p><b>Instruction Register (IR)</b></p>

<p>As the program is executed, the instruction register will display the values
of the two bytes of memory that were just read (the instruction). The program
counter will then increment its value by two.</p>

<p><b>Execution Speed Slider</b></p>

<p>Adjust this slider to determine how many seconds you want the simulator to
delay after each execution cycle. A delay of up to 10 seconds may be set. The
slider is set to a 1 second delay by default.</p>

<p><b>Instruction Listbox</b></p>

<p>When a program is loaded or assembled, this area displays all of the
instructions in a list. It will also name what the instruction is and what is
being done.</p>

<p><b>Console Window</b></p>

<p>This window simply displays the output of your program. Any value that is
written to the <code>RF</code> register will have its corresponding ASCII character written out here.</p>
<hr>

<p><b>Open</b></p>

<p>Open either an already assembled .bin file or an unassembled .asm file.
Opening a .bin file will load the values into the Main Memory table. Opening a
.asm file will open the assembly editor with the assembly code in it.</p>

<p><b>Save</b></p>

<p>Save the compiled assembly into a binary file. In other words, the values in
the Main Memory table will be saved to a .bin file.</p>

<p><b>Run</b></p>

<p>Begin program execution at the memory location pointed to by the program
counter.</p>

<p><b>Step</b></p>

<p>Perform only one instruction cycle. The program counter value will be
updated by two.</p>

<p><b>Break</b></p>

<p>Press this button while the program is running to pause execution at any
time.</p>

<p><b>Clear</b></p>

<p>This button will pop up a dialog which will ask you what things you want to
clear. You may clear the main memory, registers, program counter, and the
console window.</p>
</body>
</html>
